class Animal:
    def speak(self):
        pass


class Dog(Animal):
    def speak(self):
        print("woff")


class Cat(Animal):
    def speak(self):
        print("miao")


def make_noise(animal: Animal):
    """制造噪音，需要传入Animal对象"""
    animal.speak()


# 使用2个子类对象来调用函数
dog = Dog()
cat = Cat()

make_noise(dog)
make_noise(cat)

class AC:
    def cool_wind(self):
        """make cold"""
        pass

    def hot_wind(self):
        """make hot"""
        pass

    def swing_l_r(self):
        """turn left and turn right"""
        pass

class Midea_AC(AC):
    def cool_wind(self):
        print("midea core cool wind technology")

    def hot_wind(self):
        print("midea core hot wind technology")

    def swing_l_r(self):
        print("midea core no wind swing left and right")

class GREE_AC(AC):
    def cool_wind(self):
        print("GREE core cool wind technology")

    def hot_wind(self):
        print("GREE core hot wind technology")

    def swing_l_r(self):
        print("GREE core no wind swing left and right")

def make_cool(ac:AC):
    ac.cool_wind()

midea_ac = Midea_AC()
gree_ac = GREE_AC()

make_cool(midea_ac)
make_cool(gree_ac)